#ifndef CONSOIMPORT_H
#define CONSOIMPORT_H

#include <QWidget>
#include <QSqlDatabase>
#include <promsmodel.h>
#include <moneydelegate.h>

#include <QKeyEvent>

namespace Ui {
class ConsoImport;
}

class ConsoImport : public QWidget
{
    Q_OBJECT

public:
    explicit ConsoImport(QWidget *parent = 0);
    ~ConsoImport();

public slots:
    void reset();

signals:
    void bucquer(int id, QString nom, double prix);
    void finBucquage();

protected:
    void keyPressEvent(QKeyEvent * event);

private:
    Ui::ConsoImport *ui;
    QSqlDatabase db;
    PromsModel *model;

    QString recherche;

    void reloadConsos();
};

#endif // CONSOIMPORT_H
